<?php  

session_start();
if(!isset($_SESSION['login'])){
   header("Location:index.php");
}
require_once('connect.php');
require_once('partials/header.php'); //wczytaj header i menu

$database = Database::getInstance();


?>


    <div class="container">

        <?php
        //wyświetl informację o logowaniu jeśli występuje
        if(isset($_SESSION['alert'])){
            echo '<div class="info">'.$_SESSION['alert'].'</div>';
        }
        ?>

        <div class="row">

            <div class="col-md-3">
   
                <div class="list-group">
                    <a href="main.php" class="list-group-item">Aktualności</a>
                    <a href="assignments.php" class="list-group-item">Zapisy</a>
                    <a href="subjects.php" class="list-group-item">Przedmioty</a>
					<a href="rooms.php" class="list-group-item">Sale</a>
                    <a href="teachers.php" class="list-group-item">Prowadzący</a>
					<a href="#" class="list-group-item">Studenci</a>
                    <a href="#" class="list-group-item">Aktywacje</a>
					<a href="logout.php" class="list-group-item">Wyloguj</a>
                </div>
            </div>

            <div class="col-md-9">
				<div class="subject-table">
					<div class="subject-table-header subject-table-row">
						<div class="subject-table-header-cell">Przedmiot</div>
						<div class="subject-table-header-cell">Prowadzący</div>
						<div class="subject-table-header-cell">Sala</div>
						<div class="subject-table-header-cell">Godzina</div>
						<div class="subject-table-header-cell">Dzień</div>
						<div class="subject-table-header-cell">Rok</div>
						<div class="subject-table-header-cell">Aktywowane</div>
						<div class="subject-table-header-cell">Ilość Miejsc</div>
						<div class="subject-table-header-cell">Zapisy</div> 
						<div class="subject-table-header-cell">Aktywacja</div>
					</div>
					<div class="subject-table-row">
						<div class="subject-table-header-cell">TMP</div>
						<div class="subject-table-header-cell">Ostrowski</div>
						<div class="subject-table-header-cell">C3...</div>
						<div class="subject-table-header-cell">18</div>
						<div class="subject-table-header-cell">Poniedziałęk</div>
						<div class="subject-table-header-cell">3</div>
						<div class="subject-table-header-cell">Nie</div>
						<div class="subject-table-header-cell">15</div>
						<div class="subject-table-header-cell"><a href="#">Zapisz się</a></div>
						<div class="subject-table-header-cell"><a href="#">Aktywuj</a></div>
					</div>
					
					
				</div>
				<!--TYLKO DLA ADMINOW -->
				
				<div class="add-news-subject-area">
					<form  method = "GET">
					<select class="subject-input"><option>Przedmiot</option></select>
					<select class="subject-input"><option>Prowadzący</option></select>
					<select class="subject-input"><option>Sala</option></select>
					<input type="text" name="mail" class="subject-input" placeholder="godzina">
					<select class="subject-input"><option>Dzień</option><option>Poniedziałek</option><option>Wtorek</option><option>Środa</option><option>Czwartek</option><option>Piątek</option></select>
					<input type="text" name="mail" class="subject-input" placeholder="Rok">
					<select class="subject-input"><option>Aktywowane</option><option>Tak</option><option>Nie</option></select>
					<input type="hidden" name="addTeacher" value="true">
					<input type="submit" name="save_teacher" value="Zapisz zajęcia w bazie" class="subject-button">
					</form>
				</div>
					<!--TYLKO DLA ADMINOW -->
            </div>


                </div>

            </div>

        </div>

    </div>
 
<?php
require_once('partials/footer.php');
?>
